package kr.hkit.powerjava.chapter26.dto;

public class Department implements Comparable<Department>{   //Department테이블과 연결
	private int deptNO;
	private String deptName;
	private int floor;
	
	public Department(){}
	
	public Department(int deptNO) {
		this.deptNO = deptNO;
	}

	public Department(int deptNO, String deptName) {
		this.deptNO = deptNO;
		this.deptName = deptName;
	}

	public Department(int deptNO, String deptName, int floor) {
		this.deptNO = deptNO;
		this.deptName = deptName;
		this.floor = floor;
	}

	@Override
	public String toString() {
		return String.format("%3s\t%5s\t%2s",
				deptNO, deptName, floor);
	}

	public int getDeptNO() {
		return deptNO;
	}

	public void setDeptNO(int deptNO) {
		this.deptNO = deptNO;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public int getFloor() {
		return floor;
	}

	public void setFloor(int floor) {
		this.floor = floor;
	}

	@Override
	public int compareTo(Department o) {
		return deptNO-o.deptNO;
	}
	
	
	
}
